<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。 | Hosea Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。">
<meta name="keywords" content="vs2013 matlab 混合编程">
<meta property="og:type" content="article">
<meta property="og:title" content="在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。">
<meta property="og:url" content="http://yoursite.com/2017/10/31/vs2013中使用matlab2014b引擎实现c++和matlab混合编程/index.html">
<meta property="og:site_name" content="Hosea Blog">
<meta property="og:description" content="在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。">
<meta property="og:image" content="http://img.blog.csdn.net/20161118194639938">
<meta property="og:image" content="http://img.blog.csdn.net/20161118194755377">
<meta property="og:image" content="http://img.blog.csdn.net/20161118195709009">
<meta property="og:image" content="http://img.blog.csdn.net/20161118200102921">
<meta property="og:image" content="http://img.blog.csdn.net/20161118200817321">
<meta property="og:image" content="http://img.blog.csdn.net/20161118202438362">
<meta property="og:updated_time" content="2017-10-31T14:36:35.739Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。">
<meta name="twitter:description" content="在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。">
<meta name="twitter:image" content="http://img.blog.csdn.net/20161118194639938">
  
    <link rel="alternative" href="/atom.xml" title="Hosea Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/img/favicon.png">
  
  
      <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">
  
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
  <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  
  
      <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  
  <!-- 加载特效 -->
    <script src="/js/pace.js"></script>
    <link href="/css/pace/pace-theme-flash.css" rel="stylesheet" />
  <script>
      var yiliaConfig = {
          rootUrl: '/',
          fancybox: true,
          animate: true,
          isHome: false,
          isPost: true,
          isArchive: false,
          isTag: false,
          isCategory: false,
          open_in_new: false
      }
  </script>
</head>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/" class="profilepic">
            
            <img lazy-src="/img/head.jpg" class="js-avatar">
            
        </a>

        <hgroup>
          <h1 class="header-author"><a href="/" title="Hi Mate">Hosea</a></h1>
        </hgroup>

        
        
            <form>
                <input type="text" class="st-default-search-input search" id="search" placeholder=" Search...">
            </form>
        
        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>菜单</li>
                        <li>标签</li>
                        
                        <li>友情链接</li>
                        
                        
                        <li>关于我</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="/">博客首页</a></li>
                        
                            <li><a href="/categories">博客分类</a></li>
                        
                            <li><a href="/archives">归档</a></li>
                        
                            <li><a href="/about">关于</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fl mail" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=mairr6Csqq6orK7Z6Oi3_vb0"" title="mail">mail</a>
                            
                                <a class="fl github" target="_blank" href="https://github.com/Hosea1" title="github">github</a>
                            
                                <a class="fl zhihu" target="_blank" href="https://www.zhihu.com/people/han_xuan/activities" title="zhihu">zhihu</a>
                            
                                <a class="fl weibo" target="_blank" href="http://weibo.com/u/3263778005/home" title="weibo">weibo</a>
                            
                                <a class="fl facebook" target="_blank" href="https://www.facebook.com/Ghanxuan" title="facebook">facebook</a>
                            
                                <a class="fl csdn" target="_blank" href="http://blog.csdn.net/ghan_" title="csdn">csdn</a>
                            
                        </ul>
                    </nav>
                </section>
                
                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        <a href="/tags/Markdown/" style="font-size: 10px;">Markdown</a> <a href="/tags/cmake/" style="font-size: 10px;">cmake</a> <a href="/tags/opencv/" style="font-size: 10px;">opencv</a> <a href="/tags/ubuntu/" style="font-size: 10px;">ubuntu</a> <a href="/tags/ubuntu-常用软件/" style="font-size: 10px;">ubuntu 常用软件</a> <a href="/tags/ubuntu-界面美化/" style="font-size: 10px;">ubuntu 界面美化</a> <a href="/tags/ubuntu软件/" style="font-size: 10px;">ubuntu软件</a> <a href="/tags/vim/" style="font-size: 10px;">vim</a> <a href="/tags/vs2013-matlab-混合编程/" style="font-size: 10px;">vs2013 matlab 混合编程</a>
                    </div>
                </section>
                
                
                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://Hosea1.github.io/">name</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">纯海迷、爱运动、爱交友、爱旅行、喜欢接触新鲜事物、迎接新的挑战，更爱游离于错综复杂的编码与逻辑中</div>
                </section>
                
            </div>
        </div>
    </header>                
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="Me">Hosea</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/" class="profilepic">
                
                    <img lazy-src="/img/head.jpg" class="js-avatar">
                
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/" title="Me">Hosea</a></h1>
            </hgroup>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="/">博客首页</a></li>
                
                    <li><a href="/categories">博客分类</a></li>
                
                    <li><a href="/archives">归档</a></li>
                
                    <li><a href="/about">关于</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                <div class="social">
                    
                        <a class="mail" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=mairr6Csqq6orK7Z6Oi3_vb0"" title="mail">mail</a>
                    
                        <a class="github" target="_blank" href="https://github.com/Hosea1" title="github">github</a>
                    
                        <a class="zhihu" target="_blank" href="https://www.zhihu.com/people/han_xuan/activities" title="zhihu">zhihu</a>
                    
                        <a class="weibo" target="_blank" href="http://weibo.com/u/3263778005/home" title="weibo">weibo</a>
                    
                        <a class="facebook" target="_blank" href="https://www.facebook.com/Ghanxuan" title="facebook">facebook</a>
                    
                        <a class="csdn" target="_blank" href="http://blog.csdn.net/ghan_" title="csdn">csdn</a>
                    
                </div>
            </nav>
        </header>                
    </div>
</nav>
      <div class="body-wrap"><article id="post-vs2013中使用matlab2014b引擎实现c++和matlab混合编程" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/2017/10/31/vs2013中使用matlab2014b引擎实现c++和matlab混合编程/" class="article-date">
      <time datetime="2017-10-31T04:30:00.000Z" itemprop="datePublished">2017-10-31</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        

        
    <div class="article-tag tagcloud">
        <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/vs2013-matlab-混合编程/">vs2013 matlab 混合编程</a></li></ul>
    </div>

        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
          
        <p>在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。<br><a id="more"></a><br>在编程过程中有时候会遇到在c++中调用matlab，由于matlab强大的图像处理能力和科学计算能力，在c++中适当的调用matlab能够极大的提高编程效率，尤其是在处理图像和科学计算的时候。<br>最近两天研究这方面的配置花了好长时间，终于在使用多种方法之后得到了解决，下面将自己的配置过程以及遇到的一些问题写下了，方便自己以后查看，同时也希望能帮到和我一样遇到类似困难的朋友！<br><strong>前期准备：</strong><br>下载vs2013和matlab2014b（版本有差异应该不影响后续），并且安装。下载地址请自行google。<br><strong>开始配置：</strong></p>
<ul>
<li><p>第一步</p>
<p> 打开vs2013，新建一个win32控制台应用程序，名称，位置随意。</p>
</li>
<li><p>第二步</p>
<p> 在项目上右键点击属性，打开项目属性页，点击配置属性。</p>
</li>
<li><p>第三步</p>
<p> 点击右上角的配置管理器，<br><img src="http://img.blog.csdn.net/20161118194639938" alt="这里写图片描述"></p>
</li>
</ul>
<p>新建一个活动解决方案，<br><img src="http://img.blog.csdn.net/20161118194755377" alt="这里写图片描述"></p>
<p>选择x64位活动平台，点击确认。该步骤将32位平台转换为64为平台，原因是vs2013初始只能创建32位活动平台，如果电脑上装的是64位的matlab，就必须使用64位的平台，32位的matlab的朋友请自行忽视这一步。</p>
<ul>
<li><p>第四步</p>
<p> 点击vc++目录打开相应的窗口，设置可执行文件目录，包含目录，库目录三个目录。<br><img src="http://img.blog.csdn.net/20161118195709009" alt="这里写图片描述"><br>设置分别如下：(注意请自行修改相关路径，并且注意后面用;隔开)<br>可执行文件目录：D:\Hosea_Pro\MATLAB\extern\include\win64;<br>包含目录：D:\Hosea_Pro\MATLAB\bin\win64;<br>库目录：D:\Hosea_Pro\MATLAB\extern\lib\win64\microsoft;</p>
</li>
<li><p>第五步</p>
<p> 点击连接器下的输入，在附加依赖项中输入libmat.lib;libeng.lib;libmx.lib;点击确定完成相关配置。<br><img src="http://img.blog.csdn.net/20161118200102921" alt="这里写图片描述"></p>
</li>
<li><p>第六步</p>
<p> 新建一个cpp文件进行测试：<br>测试代码来借鉴于网上一位博主的代码。</p>
</li>
</ul>
<pre><code>#include&lt;cstdlib&gt;
#include &lt;cstdio&gt;
#include&lt;cstring&gt;
#include&quot;engine.h&quot;

const int BUFFER_SIZE = 1024;
char buffer[BUFFER_SIZE];

void test()
{
    Engine* ep;
    mxArray *x1 = NULL;
    mxArray *y1 = NULL;
    if ((ep = engOpen(&quot;&quot;)) == NULL)
    {
        printf(&quot;Engine Fail&quot;);
    }
    engOutputBuffer(ep, buffer, BUFFER_SIZE);
    printf(&quot;Init Success&quot;);

    double x[5] = { 1.0, 2.5, 3.7, 4.4, 5.1 };
    double y[5] = { 3.3, 4.7, 9.6, 15.6, 21.3 };
    x1 = mxCreateDoubleMatrix(1, 5, mxREAL);
    y1 = mxCreateDoubleMatrix(1, 5, mxREAL);

    memcpy((void *)mxGetPr(x1), (void *)x, sizeof(x));
    memcpy((void *)mxGetPr(y1), (void *)y, sizeof(y));

    engPutVariable(ep, &quot;x&quot;, x1);
    engPutVariable(ep, &quot;y&quot;, y1);

    engEvalString(ep, &quot;plot(x,y)&quot;);
    getchar();
    engClose(ep);
}

int main()
{
    test();
}
</code></pre><p>生成解决方案，运行，结果如下。</p>
<p><img src="http://img.blog.csdn.net/20161118200817321" alt="这里写图片描述"></p>
<p>可以看到，vs2013调用matlab完美成功。</p>
<ul>
<li>第七步<br>基本上改了平台，填了目录，填了库名，就可以万事大吉了。但是有时候往往还是会有各种破事，比如提示libeng.dll找不到啊之类的。这时候呢，可以通过修改环境变量的方式来解决这个问题。D:\Hosea_Pro\MATLAB\R2014b\bin\win64; 把原来可执行程序的目录加入到系统的PATH环境变量中，然后记得重启。。。。就可以解决问题了</li>
</ul>
<p><strong>遇到的问题：</strong></p>
<p>第一个遇到的问题就是平台不合适的问题，这个问题也是困扰我时间最长的一个问题，刚开始的时候没有注意的这个问题，所以出现了许多无法解析外部符号的问题：</p>
<p><img src="http://img.blog.csdn.net/20161118202438362" alt="这里写图片描述"></p>
<p><a href="http://www.cnblogs.com/Vonng/p/4232586.html" target="_blank" rel="external">主要参考自(http://www.cnblogs.com/Vonng/p/4232586.html)</a></p>

      
      
        <div class="page-reward">
          <p><a href="javascript:void(0)" onclick="dashangToggle()" class="dashang">赏</a></p>
          <div class="hide_box"></div>
          <div class="shang_box">
            <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()">×</a>
            <div class="shang_tit">
              <p>纯属好玩</p>
            </div>
            <div class="shang_payimg">
              <img src="/img/alipayimg.jpg" alt="扫码支持" title="扫一扫" />
            </div>
              <div class="pay_explain">扫码打赏，你说多少就多少</div>
            <div class="shang_payselect">
              
                <div class="pay_item checked" data-id="alipay">
                  <span class="radiobox"></span>
                  <span class="pay_logo"><img src="/img/alipay.png" alt="支付宝" /></span>
                </div>
              
              
                <div class="pay_item" data-id="wechat">
                  <span class="radiobox"></span>
                  <span class="pay_logo"><img src="/img/weixin.png" alt="微信" /></span>
                </div>
              
            </div>
            <div class="shang_info">
              <p>打开<span id="shang_pay_txt">支付宝</span>扫一扫，即可进行扫码打赏哦</p>
            </div>
          </div>
        </div>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
        <script type="text/javascript">
          $(".pay_item").click(function(){
            $(this).addClass('checked').siblings('.pay_item').removeClass('checked');
            var dataid=$(this).attr('data-id');
            $(".shang_payimg img").attr("src","/img/"+dataid+"img.jpg");
            $("#shang_pay_txt").text(dataid=="alipay"?"支付宝":"微信");
          });
          function dashangToggle(){
            
            $(".hide_box").fadeToggle();
            $(".shang_box").fadeToggle();
          }
        </script>
      
    </div>
    
  </div>
  
    
    <div class="copyright">
        <p><span>本文标题:</span><a href="/2017/10/31/vs2013中使用matlab2014b引擎实现c++和matlab混合编程/">在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。</a></p>
        <p><span>文章作者:</span><a href="/" title="访问 Hosea 的个人博客">Hosea</a></p>
        <p><span>发布时间:</span>2017年10月31日 - 12时30分</p>
        <p><span>最后更新:</span>2017年10月31日 - 22时36分</p>
        <p>
            <span>原始链接:</span><a class="post-url" href="/2017/10/31/vs2013中使用matlab2014b引擎实现c++和matlab混合编程/" title="在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。">http://yoursite.com/2017/10/31/vs2013中使用matlab2014b引擎实现c++和matlab混合编程/</a>
            <span class="copy-path" data-clipboard-text="原文: http://yoursite.com/2017/10/31/vs2013中使用matlab2014b引擎实现c++和matlab混合编程/　　作者: Hosea" title="点击复制文章链接"><i class="fa fa-clipboard"></i></span>
            <script src="/js/clipboard.min.js"></script>
            <script> var clipboard = new Clipboard('.copy-path'); </script>
        </p>
        <p>
            <span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/cn/" title="中国大陆 (CC BY-NC-SA 3.0 CN)" target = "_blank">"署名-非商用-相同方式共享 3.0"</a> 转载请保留原文链接及作者。
        </p>
    </div>



<nav id="article-nav">
  
    <a href="/2017/10/31/markdown操作文档/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption"><</strong>
      <div class="article-nav-title">
        
          MarkDown操作文档
        
      </div>
    </a>
  
  
</nav>

  
</article>

    <div id="toc" class="toc-article">
    <strong class="toc-title">文章目录</strong>
    
</div>
<input type="button" id="tocButton" value="隐藏目录"  title="点击按钮隐藏或者显示文章目录">

<script src="https://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script>
    var valueHide = "隐藏目录";
    var valueShow = "显示目录";

    if ($(".left-col").is(":hidden")) {
        $("#tocButton").attr("value", valueShow);
    }
    $("#tocButton").click(function() {
        if ($("#toc").is(":hidden")) {
            $("#tocButton").attr("value", valueHide);
            $("#toc").slideDown(320);
        }
        else {
            $("#tocButton").attr("value", valueShow);
            $("#toc").slideUp(350);
        }
    })
    if ($(".toc").length < 1) {
        $("#toc, #tocButton").hide();
    }
</script>


    <style>
        .toc {
            white-space: nowrap;
            overflow-x: hidden;
        }
    </style>

    <script>
        $(document).ready(function() {
            $(".toc li a").mouseover(function() {
                var title = $(this).attr('href');
                $(this).attr("title", title);
            });
        })
    </script>




<div class="bdsharebuttonbox">
	<a href="#" class="fx fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
	<a href="#" class="fx fa-weixin bds_weixin" data-cmd="weixin" title="分享到微信"></a>
	<a href="#" class="fx fa-qq bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
	<a href="#" class="fx fa-facebook-official bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
	<a href="#" class="fx fa-twitter bds_twi" data-cmd="twi" title="分享到Twitter"></a>
	<a href="#" class="fx fa-linkedin bds_linkedin" data-cmd="linkedin" title="分享到linkedin"></a>
	<a href="#" class="fx fa-files-o bds_copy" data-cmd="copy" title="分享到复制网址"></a>
</div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>




    
        <div id="gitments"></div>
<script src="/js/gitment.browser.js"></script>
<script>
    var gitment = new Gitment({
      id: window.location.pathname,
      owner: 'Hosea1',
      repo: 'Hosea1.github.io',
      oauth: {
        client_id: 'be3431fc1796f8ca03bd',
        client_secret: '238bbbdaff2c2b38928dfca773326b361f626717',
      },
    })
    gitment.render('gitments')
</script>
    



    <div class="scroll" id="post-nav-button">
        
            <a href="/2017/10/31/markdown操作文档/" title="上一篇: MarkDown操作文档">
                <i class="fa fa-angle-left"></i>
            </a>
        
        <a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a>
        
            <a href="/" title="回到主页"><i class="fa fa-home"></i></a>
        
    </div>
    <ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2017/10/31/ubuntu使用-软件篇-matlab/">ubuntu使用-软件篇</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/10/31/ubuntu使用-基础篇：常用软件/">ubuntu使用-基础篇：常用软件</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/10/31/ubuntu使用-界面美化/">ubuntu使用-界面美化</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/10/31/ubuntu-vim-opencv-cmake环境搭建/">ubuntu+vim+opencv+cmake环境搭建</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/10/31/markdown操作文档/">MarkDown操作文档</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/10/31/vs2013中使用matlab2014b引擎实现c++和matlab混合编程/">在Visual C++ 2013 工程中使用 Matlab2014b 提供的图形引擎进行绘图的详细过程。</a></li></ul>
    <script src="https://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
    <script>
        $(".post-list").addClass("toc-article");
        $(".post-list-item a").attr("target","_blank");
        $("#post-nav-button > a:nth-child(2)").click(function() {
            $(".fa-bars, .fa-times").toggle();
            $(".post-list").toggle(300);
            if ($(".toc").length > 0) {
                $("#toc, #tocButton").toggle(200, function() {
                    if ($(".switch-area").is(":visible")) {
                        $("#tocButton").attr("value", valueHide);
                        }
                    })
            }
            else {
            }
        })
    </script>



    <script>
        
    </script>
</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                &copy; 2017 Hosea
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/luuman/hexo-theme-spfk" target="_blank">spfk</a> by luuman
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" >海贼到访数: 
                            <span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>, </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit">本页阅读量: 
                            <span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>

    </div>
    <script src="https://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script src="/js/main.js"></script>

    <script>
        $(document).ready(function() {
            var backgroundnum = 24;
            var backgroundimg = "url(/background/bg-x.jpg)".replace(/x/gi, Math.ceil(Math.random() * backgroundnum));
            $("#mobile-nav").css({"background-image": backgroundimg,"background-size": "cover","background-position": "center"});
            $(".left-col").css({"background-image": backgroundimg,"background-size": "cover","background-position": "center"});
        })
    </script>





<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


<div class="scroll" id="scroll">
    <a href="#"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments"><i class="fa fa-comments-o"></i></a>
    <a href="#footer"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    $(document).ready(function() {
        if ($("#comments").length < 1) {
            $("#scroll > a:nth-child(2)").hide();
        };
    })
</script>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>

  <script language="javascript">
    $(function() {
        $("a[title]").each(function() {
            var a = $(this);
            var title = a.attr('title');
            if (title == undefined || title == "") return;
            a.data('title', title).removeAttr('title').hover(

            function() {
                var offset = a.offset();
                $("<div id=\"anchortitlecontainer\"></div>").appendTo($("body")).html(title).css({
                    top: offset.top - a.outerHeight() - 15,
                    left: offset.left + a.outerWidth()/2 + 1
                }).fadeIn(function() {
                    var pop = $(this);
                    setTimeout(function() {
                        pop.remove();
                    }, pop.text().length * 800);
                });
            }, function() {
                $("#anchortitlecontainer").remove();
            });
        });
    });
</script>


    <script type="text/javascript">
      window.onload = function(){
        document.getElementById("search").onclick = function(){
            console.log("search")
            search();
        }
      }
      function search(){
        (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
        (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
        e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
        })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

        _st('install','A1Pz-LKMXbrzcFg2FWi6','2.0.0');
      }
    </script>

  </div>
</body>
</html>